<!DOCTYPE html>
<html lang="en" class="no-js">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge"> 
<meta name="viewport" content="width=device-width, initial-scale=1"> 
<title>代理登陆</title>
<link rel="stylesheet" type="text/css" href="__CSS__/normalize.css" />
<link rel="stylesheet" type="text/css" href="__CSS__/demo.css" />
<!--必要样式-->
<link rel="stylesheet" type="text/css" href="__CSS__/component.css" />
<!--[if IE]>
<script src="js/html5.js"></script>
<![endif]-->
</head>
<body>
	<div class="container demo-1">
		<div class="content">
			<div id="large-header" class="large-header">
				<canvas id="demo-canvas"></canvas>
				<div class="logo_box">
					<h3>欢迎你</h3>
					<form action="#" id="doform" name="f" method="post">
						<div class="input_outer">
							<span class="u_user"></span>
							<input name="logname" class="text" style="color: #FFFFFF !important" type="text" placeholder="请输入账户">
						</div>
						<div class="input_outer">
							<span class="us_uer"></span>
							<input name="logpass" class="text" style="color: #FFFFFF !important; position:absolute; z-index:100;"value="" type="password" placeholder="请输入密码">
						</div>
						<div class="input_outer">
							<span><input name="code" class="text" style="margin-left:1rem;width:50%;color: #FFFFFF !important;" value="" type="text" placeholder="请输入验证码"></span>
							<img src="{:captcha_src()}" alt="captcha" id="code" style="float:right;border-radius:17px;padding-right: -5px;padding-top: 1.3px" onclick="this.src='{:captcha_src()}'" />
						</div>

						<div class="mb2">
							<a class="act-but submit" href="javascript:;" style="color: #FFFFFF">登录</a>
						</div>
					</form>
				</div>
			</div>
		</div>
	</div><!-- /container -->
	<script src="__JS__/TweenLite.min.js"></script>
	<script src="__JS__/EasePack.min.js"></script>
	<script src="__JS__/rAF.js"></script>
	<script src="__JS__/demo-1.js"></script>
	<script src="__JS__/jquery.min.js"></script>
	<script src="__JS__/layui.all.js"></script>
	<script type="text/javascript">
		$(document).keydown(function(e){
		  	if(e.keyCode == 13) {
		  		$(".submit").click();
		  	}
		});

		$('.mb2').click(function(){

			var logname = $("input[name='logname']").val();
			var logpass = $("input[name='logpass']").val();
			var code = $("input[name='code']").val();
			if(logname == ''){
				layer.msg('请输入账户名!');
				return false;
			}
			if(logpass == ''){
				layer.msg('密码不能为空!');
				return false;
			}
			if(code == ''){
				layer.msg('请输入验证码!');
				return false;
			}

			var urls = "{:Url('member/Login/dologin')}";
			var data = $('#doform').serialize();

			$.post(urls, data, function(e){
				if(e.error == '1'){
					layer.msg(e.msg);
					$('#code').click();
					return false;
				}else if(e.error == '0'){
					layer.msg(e.msg);
					setTimeout(function(){
						window.location.href=e.url
					},2000) 
				}
			});
		});
	</script>
</body>
</html>